package com.yellow.courierservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yellow.courierservice.entity.DeliveryArea;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface DeliveryAreaMapper extends BaseMapper<DeliveryArea> {
    @Select("select da.area_name from delivery_areas as da left join courier_profiles as cp on da.courier_id = cp.courier_id where cp.name = #{name}")
    String getDeliveryAreaByCourierName(@Param(value = "name") String name);
}
